-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(agent-manager): add YOLO mode toggle and session rename #4890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add YOLO mode toggle button in session header to enable/disable auto-approval of operations with indicator in session list. Add inline session rename functionality. Also fixes messages not loading when reopening panel and race condition with pending session timeout.
🦋 Changeset detectedLatest commit: 82a5240 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@marius-kilocode Thanks for testing! The Could you check if you have a local CLI configuration that auto-approves |
|
I dug a bit further. If i switch in an independent CLI to yolo mode the approval buttons don't work anymore. Once I switch back in a separate CLI to non-yolo the buttons work. I suspect this might either be a bug attached to: //The code in question (cli.ts:287-295):
// In JSON-IO mode, don't set yoloMode on the extension host.
// This prevents Task.ts from auto-answering followup questions.
// The CLI's approval layer handles YOLO behavior and correctly excludes followups.
if (!this.options.jsonInteractive) {
extensionHost.sendWebviewMessage({
type: "yoloMode",
bool: Boolean(this.options.ci || this.options.yolo),
})
}which we might just remove now as we disabled the question tool in yolo mode on main. Or it is some |
|
I investigated the // cli/src/config/defaults.ts
execute: {
enabled: true,
allowed: ["ls", "cat", "echo", "pwd"],
denied: ["rm -rf", "sudo rm", "mkfs", "dd if="],
}
Still investigating the global state issue you mentioned separately. |
|
@marius-kilocode Regarding your observation:
I'd like to understand better what's happening. Here's what I think the issue might be: My understanding: Proposed solution:
Questions:
I want to make sure I'm solving the right problem before pushing the fix. |
Resolved conflicts to keep both features: - YOLO mode toggle and session rename from this branch - Model selection from upstream Conflicts resolved in: - packages/core-schemas/src/agent-manager/types.ts (added yoloMode to schemas) - src/core/kilocode/agent-manager/types.ts (keep re-export approach) - src/core/kilocode/agent-manager/CliArgsBuilder.ts (yoloMode + model) - src/core/kilocode/agent-manager/AgentRegistry.ts (yoloMode + model) - src/core/kilocode/agent-manager/CliProcessHandler.ts (yoloMode + model) - src/core/kilocode/agent-manager/AgentManagerProvider.ts (merged handlers) - webview-ui components (YOLO toggle + model picker) - webview-ui CSS (both style sections) - All 22 locale files (both translation sets)
Previously, when a CLI was launched with --yolo flag, it would send a yoloMode message to the extension host, modifying the global state. This caused a bug where launching a CLI with --yolo outside of Agent Manager would affect all Agent Manager sessions. Changes: - Remove the code in cli.ts that sends yoloMode to extension host - Update toggleYoloModeAtom to only modify local state - Update tests to reflect the new isolation behavior Each CLI instance now manages its own yoloMode state locally via yoloModeAtom. Agent Manager sessions get their isolated yoloMode through the --yolo flag passed to each CLI process. Fixes issue reported in PR Kilo-Org#4890 review by @marius-kilocode
|
@marius-kilocode You were right! I misunderstood the issue - it wasn't about synchronization, but about global state pollution. The code in Fix applied (commit
Ready for review! Thanks for taking the time to dig into this and identify the root cause 🙏 |
|
Also worth mentioning: this PR is highly anticipated on my end. The automatic YOLO mode behavior is seen as a significant concern in my company, and it's currently a blocker for wider adoption. Having proper control over auto-approval per session would really help address those security/governance concerns. |
|
@Drilmo I will prio it, thanks for the feedback! |
6af24f9 to
593d770
Compare
Resolve conflicts preserving all features: - YOLO mode toggle (our feature) - Session rename (our feature) - Image paste support (from upstream) - Worktree setup script configuration (from upstream) Conflicts resolved: - AgentManagerProvider.ts: keep renameSession + add configureSetupScript + images - SessionDetail.tsx: merge image thumbnails with YOLO toggle - SessionSidebar.tsx: merge all lucide imports (including Zap) - 21 locale files: keep yoloMode + add options + configureSetupScript - ExtensionMessageRow.tsx: use FallbackProps type - pnpm-lock.yaml: regenerated
593d770 to
82a5240
Compare

Summary
Bug Fixes
Improvements
respondToApprovalandrenameSessionmessagesScreenshots
YOLO Mode Toggle
Session with YOLO Mode (Auto-approve)
No Approve/Deny buttons - operations are auto-approved:
Session without YOLO Mode (Manual approval)
Approve/Deny buttons visible for each operation:
Approval Button States
Inline Session Rename
Test plan